home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 3: Developer Tools / Linux Cubed Series 3 - Developer Tools.iso / devel / make / icmake-6.000 / icmake-6 / icmake / exec / funcopyv.c < prev    next >
Encoding:
C/C++ Source or Header  |  1994-02-08  |  812 b   |  35 lines

  1. /*
  2. \funcref{fun\_copy\_var}{void fun\_copy\_var ()}
  3.     {}
  4.     {}
  5.     {error()}
  6.     {}
  7.     {funcopyv.c}
  8.     {
  9.  
  10.         This function is called when an {\em op\_copy\_var} opcode is
  11.         encountered in the makefile. Following this opcode, a variable index is
  12.         expected. The index may point to a global variable, to a function
  13.         parameter or to a local variable.
  14.  
  15.         The function serves multiple assignments. The last pushed variable is
  16.         copied onto the indicated variable. For {\em e\_str} and {\em e\_list}
  17.         variables, this may involve the sharing of occupied memory.
  18.  
  19.     }
  20. */
  21.  
  22. #include "icm-exec.h"
  23.  
  24. void fun_copy_var ()
  25. {
  26.     register VAR_
  27.         *dest;
  28.  
  29.     dest = getdest ();
  30.     *dest = stack [sp];
  31.  
  32.     if (dest->type & (e_str | e_list))
  33.         dest->vu.i->count++;
  34. }
  35.